<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Flow: async/concurrent_task_loop.hpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Flow<span id="projectnumber">&#160;2.0.0</span>
   </div>
   <div id="projectbrief">Flow project: Full implementation reference.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_ddc98e6e1a9e0f6adcacab8ac7c1f855.html">async</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#namespaces">Namespaces</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">concurrent_task_loop.hpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="async__fwd_8hpp_source.html">flow/async/async_fwd.hpp</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="op_8hpp_source.html">flow/async/op.hpp</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="sched__task__fwd_8hpp_source.html">flow/util/sched_task_fwd.hpp</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="util_2util_8hpp_source.html">flow/util/util.hpp</a>&quot;</code><br />
</div>
<p><a href="concurrent__task__loop_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1async_1_1Concurrent__task__loop.html">flow::async::Concurrent_task_loop</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">The core <a class="el" href="namespaceflow_1_1async.html" title="Flow module containing tools enabling multi-threaded event loops operating under the asynchronous-tas...">flow::async</a> interface, providing an optionally multi-threaded thread pool onto which runnable <code>Task</code>s, optionally arranged into concurrency-avoiding <code>Op</code>s, can be boost.asio-posted for subsequent execution.  <a href="classflow_1_1async_1_1Concurrent__task__loop.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:namespaceflow"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow.html">flow</a></td></tr>
<tr class="memdesc:namespaceflow"><td class="mdescLeft">&#160;</td><td class="mdescRight">Catch-all namespace for the Flow project: A collection of various production-quality modules written in modern C++17, originally by ygoldfel. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:namespaceflow_1_1async"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1async.html">flow::async</a></td></tr>
<tr class="memdesc:namespaceflow_1_1async"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flow module containing tools enabling multi-threaded event loops operating under the asynchronous-task proactor pattern, by providing a streamlined API around boost.asio event loops with added advanced task- and thread-scheduling features. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:abdde86e8129cc056ef4c7dc2cafca8a7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="concurrent__task__loop_8hpp.html#abdde86e8129cc056ef4c7dc2cafca8a7">FLOW_ASYNC_HW_THREAD_AFFINITY_PTHREAD_VIA_CORE_IDX</a></td></tr>
<tr class="memdesc:abdde86e8129cc056ef4c7dc2cafca8a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Macro set to <code>1</code> (else <code>0</code>) if and only if natively the pthread API allows one to set thread-to-core affinity.  <a href="concurrent__task__loop_8hpp.html#abdde86e8129cc056ef4c7dc2cafca8a7">More...</a><br /></td></tr>
<tr class="separator:abdde86e8129cc056ef4c7dc2cafca8a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acfbcdb498fb2ebbeae127cb5a777bb29"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="concurrent__task__loop_8hpp.html#acfbcdb498fb2ebbeae127cb5a777bb29">FLOW_ASYNC_HW_THREAD_AFFINITY_MACH_VIA_POLICY_TAG</a></td></tr>
<tr class="memdesc:acfbcdb498fb2ebbeae127cb5a777bb29"><td class="mdescLeft">&#160;</td><td class="mdescRight">Macro set to <code>1</code> (else <code>0</code>) if and only if natively there is Mach kernel API that allows to set thread-to-core affinity using the policy tag mechanism.  <a href="concurrent__task__loop_8hpp.html#acfbcdb498fb2ebbeae127cb5a777bb29">More...</a><br /></td></tr>
<tr class="separator:acfbcdb498fb2ebbeae127cb5a777bb29"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:af90c1e763d49c3f3033a74871e897394"><td class="memTemplParams" colspan="2">template&lt;typename Handler &gt; </td></tr>
<tr class="memitem:af90c1e763d49c3f3033a74871e897394"><td class="memTemplItemLeft" align="right" valign="top">auto&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1async.html#af90c1e763d49c3f3033a74871e897394">flow::async::asio_handler_via_op</a> (Concurrent_task_loop *loop, const Op &amp;op, Handler &amp;&amp;handler)</td></tr>
<tr class="memdesc:af90c1e763d49c3f3033a74871e897394"><td class="mdescLeft">&#160;</td><td class="mdescRight">Given a boost.asio <em>completion handler</em> <code>handler</code> for a boost.asio <code>async_*()</code> action on some boost.asio I/O object to be initiated in the immediate near future, returns a wrapped handler with the same signature to be passed as the handler arg to that <code>async_*()</code> action, so that <code>handler()</code> will execute non-concurrently with other tasks in <code>Op op</code>.  <a href="namespaceflow_1_1async.html#af90c1e763d49c3f3033a74871e897394">More...</a><br /></td></tr>
<tr class="separator:af90c1e763d49c3f3033a74871e897394"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="acfbcdb498fb2ebbeae127cb5a777bb29" name="acfbcdb498fb2ebbeae127cb5a777bb29"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acfbcdb498fb2ebbeae127cb5a777bb29">&#9670;&nbsp;</a></span>FLOW_ASYNC_HW_THREAD_AFFINITY_MACH_VIA_POLICY_TAG</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FLOW_ASYNC_HW_THREAD_AFFINITY_MACH_VIA_POLICY_TAG</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Macro set to <code>1</code> (else <code>0</code>) if and only if natively there is Mach kernel API that allows to set thread-to-core affinity using the policy tag mechanism. </p>
<p >This is specific to Mac kernels (used in Darwin/Mac) and not all of them.</p>
<p >The macro conceptually belongs to the <a class="el" href="namespaceflow_1_1async.html" title="Flow module containing tools enabling multi-threaded event loops operating under the asynchronous-tas...">flow::async</a> namespace, hence the prefix.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="concurrent__task__loop_8hpp.html#abdde86e8129cc056ef4c7dc2cafca8a7" title="Macro set to 1 (else 0) if and only if natively the pthread API allows one to set thread-to-core affi...">FLOW_ASYNC_HW_THREAD_AFFINITY_PTHREAD_VIA_CORE_IDX</a> </dd></dl>

<p class="definition">Definition at line <a class="el" href="concurrent__task__loop_8hpp_source.html#l00668">668</a> of file <a class="el" href="concurrent__task__loop_8hpp_source.html">concurrent_task_loop.hpp</a>.</p>

</div>
</div>
<a id="abdde86e8129cc056ef4c7dc2cafca8a7" name="abdde86e8129cc056ef4c7dc2cafca8a7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abdde86e8129cc056ef4c7dc2cafca8a7">&#9670;&nbsp;</a></span>FLOW_ASYNC_HW_THREAD_AFFINITY_PTHREAD_VIA_CORE_IDX</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FLOW_ASYNC_HW_THREAD_AFFINITY_PTHREAD_VIA_CORE_IDX</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Macro set to <code>1</code> (else <code>0</code>) if and only if natively the pthread API allows one to set thread-to-core affinity. </p>
<p >This API, if available, is an extension of POSIX and not always available.</p>
<p >The macro conceptually belongs to the <a class="el" href="namespaceflow_1_1async.html" title="Flow module containing tools enabling multi-threaded event loops operating under the asynchronous-tas...">flow::async</a> namespace, hence the prefix.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="concurrent__task__loop_8hpp.html#acfbcdb498fb2ebbeae127cb5a777bb29" title="Macro set to 1 (else 0) if and only if natively there is Mach kernel API that allows to set thread-to...">FLOW_ASYNC_HW_THREAD_AFFINITY_MACH_VIA_POLICY_TAG</a> </dd></dl>

<p class="definition">Definition at line <a class="el" href="concurrent__task__loop_8hpp_source.html#l00656">656</a> of file <a class="el" href="concurrent__task__loop_8hpp_source.html">concurrent_task_loop.hpp</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Mar 28 2025 22:55:35 for Flow by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
